<template>
  <div id="app">
    <div class="appcontainer">
      <div class="changeItems">
        <el-menu default-active="1-4-1" class="el-menu-vertical-demo">
          <el-menu-item v-for="item in appList" :key="item.name" :index="item.activeRule" :name="item.name" @click="totiao(item)">
            <el-icon>
              <icon-menu />
            </el-icon>
            <span>{{ item.name }}</span>
          </el-menu-item>
        </el-menu>
      </div>
      <div id="subapp-container"></div>
    </div>
  </div>
</template>

<script>
import { apps } from './config'

export default {
  name: 'App',
  data() {
    return {
      appList: apps,
    }
  },
  methods: {
    totiao(a) {
      this.$router.push(a.activeRule)
    }
  }
}
</script>

<style>
.appcontainer {
    display: flex;
}
.changeItems {
    width: 200px;
}
#subapp-container {
    padding: 10px 20px;
    width: 100%;
    height: 400px;
    background-color: lightblue;
}
</style>
